/**
 * 
 */
package com.uit.project.bustrip.factory;


import android.util.Log;

/**
 * @author Nguyen
 *
 */
public class EntityFactory{
	public static final String TAG = "EntityFactory";
	/**
	 * 
	 * @param clazz
	 * @return BaseEntity
	 */
	public static <T> T instance(Class<T> clazz){
		try {
			return (T)clazz.newInstance();
		} catch (InstantiationException e) {
			Log.e(TAG + " - InstantiationException" , e.getMessage());
			return null;
		} catch (IllegalAccessException e) {
			Log.e(TAG + " - IllegalAccessException", e.getMessage());
			return null;
		}
	}
}
